from pathlib import Path

from service.consolidators.pipe_fitting.consolidator import Consolidator, Bidder


def test_pipe_fitting_consolidator():
    tender_document = Path("./data/tender.xlsx")
    summary_document = Path("./data/summary.xlsx")
    consolidator = Consolidator(
        tender_document=tender_document,
        summary_document=summary_document,
    )
    consolidator.load_tender()
    bidders = [
        Bidder(
            name="南昌国美",
            document=Path("./data/南昌国美.xlsx"),
            has_bargaining=True,
            bargaining_document=Path("./data/南昌国美议价.xlsx"),
        ),
        Bidder(
            name="南昌洪象",
            document=Path("./data/南昌洪象.xlsx"),
        ),
    ]
    consolidator.add_bids(bidders)
    consolidator.save()


test_pipe_fitting_consolidator()
